#!/bin/sh

uci -q batch <<-EOF >/dev/null
	delete ucitrack.@zerotier[-1]
	add ucitrack zerotier
	set ucitrack.@zerotier[-1].init=zerotier
	commit ucitrack

	delete firewall.zerotier
	set firewall.zerotier=include
	set firewall.zerotier.type=script
	set firewall.zerotier.path=/etc/zerotier.start
	set firewall.zerotier.reload=1
	commit firewall
EOF

rm -f /tmp/luci-indexcache
exit 0
